@echo off
echo Compiling rgb_similarity.c...
gcc -o rgb_similarity.exe rgb_similarity.c -lm
if %errorlevel% equ 0 (
    echo Compilation successful!
    echo Running the program...
    echo.
    rgb_similarity.exe
    echo.
    echo Program finished.
) else (
    echo Compilation failed! Please make sure MinGW-w64 or GCC is installed.
    echo.
    echo Installation instructions:
    echo 1. Download and install MinGW-w64: https://www.mingw-w64.org/
    echo 2. Or use MSYS2: https://www.msys2.org/
    echo 3. Make sure the gcc command is in your PATH environment variable
)
pause 